// pages/MyMessage/MyMessage.js
Page({
  data: {
    iphoneXheight: 125,
    checked: true,
    interest: false,
    no_interest: false,
    nation_value: ['汉族', '蒙古族', '回族', '藏族', '维吾尔族', '苗族', '彝族', '壮族', '布依族', '朝鲜族', '满族', '侗族', '瑶族', '白族', '土家族', '哈尼族', '哈萨克族', '傣族', '黎族', '僳僳族', '佤族', '畲族'],
    nation_index: 0
  },
  upload_picture: function() {
    var _this = this
    wx.chooseImage({
      count: 9, // 最多可以选择的图片张数，默认9
      sizeType: ['original', 'compressed'], // original 原图，compressed 压缩图，默认二者都有
      sourceType: ['album', 'camera'], // album 从相册选图，camera 使用相机，默认二者都有
      success: function(res) {
        console.log(res);
        _this.setData({
          src: res.tempFilePaths
        })
      },
      fail: function() {},
      complete: function() {}
    })
  },
  onLoad: function(options) {
    if (wx.getSystemInfoSync().model != "iPhone X") {
      this.setData({
        iphoneXheight: 105
      })
    }
  },
  nation: function(e) {
    this.setData({
      nation_index: e.detail.value
    });
  },
  jump_Hobby: function() {
    wx.navigateTo({
      url: 'Hobby/Hobby',
    })
  },
  call: function() {
    wx.makePhoneCall({
      phoneNumber: '10086'
    })
  }
})